
/*
 * Hlpay-Plus aggregate payment system.
 * Copyright (c) 2024-2025 Hlpay Team Copyright has the right of final interpretation.
 */

package com.hlkj.pay.app.merchant.ext;

import javax.servlet.http.HttpServletRequest;

import com.hlkj.framework.common.pojo.CommonResult;
import com.hlkj.framework.extension.ExtensionPointI;
import com.hlkj.pay.app.merchant.ext.dto.payment.ChannelVirtualAccountContext;
import com.hlkj.pay.app.merchant.ext.dto.report.*;
import com.hlkj.pay.dto.merchant.ReportChannelParamsDto;
import com.hlkj.pay.dto.merchant.report.MerchantReportDto;
import com.hlkj.pay.infrastructure.model.pay.ProviderChannelConfigDO;

/**
 * 通道商户报备
 * 
 * @author HlpayTeam
 * @date 2024/09/12 11:39
 */
public interface ChannelMerchantReportExtPt extends ExtensionPointI {

    /**
     *
     * @param merchantReportDto
     * @return
     */
    String requestUrl(MerchantReportDto merchantReportDto);

    /**
     *
     * @param channelMerchantReportContext
     */
    void merchantReport(ChannelMerchantReportContext channelMerchantReportContext);

    /**
     * requestUrl
     *
     * @param reportChannelParamsDto
     * @return
     */
    String channelParams(ReportChannelParamsDto reportChannelParamsDto);

    /**
     * 商户进件 channelMerchantAccessContext
     *
     * @param channelMerchantAccessContext
     * @return
     */
    void merchantReportQuery(ChannelMerchantReportQueryContext channelMerchantAccessContext);

    /**
     * 业务签约 就是短信通知
     *
     * @param channelMerchantReportSignContext
     * @return
     */
    void merchantReportSign(ChannelMerchantReportSignContext channelMerchantReportSignContext);

    /**
     *
     * @param request
     * @param providerChannelConfigDO
     * @return
     */
    MerchantReportCallBackDto submitReportCallBackParamsParse(HttpServletRequest request, ProviderChannelConfigDO providerChannelConfigDO);

    /**
     *
     * @param request
     * @return
     */
    MerchantReportAmountCallBackDto reportAmountCallBackParamsParse(HttpServletRequest request);
    /**
     *
     * @param request
     * @return
     */
    CommonResult<MerchantReportAmountCallBackDto> reportAmountCallBackParamsParse(HttpServletRequest request, ProviderChannelConfigDO providerChannelConfigDO);

    /**
     *
     * @param callBackBody
     * @param providerChannelConfigDO
     * @return
     */
    Boolean verifyCallBackParamsParse(String callBackBody, ProviderChannelConfigDO providerChannelConfigDO);

    /**
     *
     * @param request
     * @param providerChannelConfigDO
     * @return
     */
    MerchantReportAllotCallBackDto reportAllotCallBackParamsParse(HttpServletRequest request, ProviderChannelConfigDO providerChannelConfigDO);

    /**
     * 
     * @param channelMerchantReportBusContext
     */
    void merchantReportAllot(ChannelMerchantReportBusContext channelMerchantReportBusContext);

    /**
     * 
     * @param channelMerchantReportQueryContext
     */
    void merchantReportAllotQuery(ChannelMerchantReportBusContext channelMerchantReportQueryContext);

    /**
     *
     * @param channelMerchantReportQueryContext
     */
    void merchantReportAllotProof(ChannelMerchantReportBusContext channelMerchantReportQueryContext);

    /**
     *
     * @param channelMerchantReportQueryContext
     */
    void merchantReportSignQuery(ChannelMerchantReportQueryContext channelMerchantReportQueryContext);

    /**
     * 账号查询
     *
     * @param channelVirtualAccountContext
     */
    void queryChannelAccount(ChannelVirtualAccountContext channelVirtualAccountContext);


    void getMerchantReportSign(ChannelMerchantReportSignContext channelMerchantReportSignContext);

    /**
     *
     * @param commonResult
     * @return
     */
    String callBackResponse(CommonResult commonResult);
}
